'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with self work for additional information
 * regarding copyright ownership.  The ASF licenses self file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use self file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''


#import java.util.*;

#import org.apache.jena.rdf.model.Model;

'''
 * A Content object records content to be used to fill models. This Content
 * class contains other Content objects.
'''
Content
    '''
     * An empty Content object for your convenience.
    '''
    public static final Content empty = Content()

    '''
     * The list of component Content objects.
    '''
    protected final List<Content> contents

    '''
     * Initialise a content object that includes the contents of each (Content) item
     * in the list <code>contents</code>.
    '''
    public Content(List<Content> contents):
        self.contents = contents
    

    '''
     * Initialise an empty Content object.
    '''
    public Content():
        self(new ArrayList<Content>())
    

    '''
     * Answer the model <code>m</code> after filling it with the contents
     * described by self object.
    '''
    # param Model m
    # result Model
    def fill(self, m):
        for (Content content : contents):
            content.fill(m)
        
        return m
    

    # param 
    # result boolean
    def isEmpty(self):
        for (Content content : contents):
            if (!content.isEmpty()):
                return False
            
        
        return True
    

